home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Mark Nelson <markn@airmail.net>
- Newsgroups: comp.lang.c++
- Subject: Re: Interrupts in C++
- Date: Thu, 01 Feb 1996 08:40:38 -0600
- Organization: customer of Internet America
- Message-ID: <3110D0E6.3198@airmail.net>
- References: <310FBF6A.6692@sask.aecl.ca>
- NNTP-Posting-Host: dal03-17.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Mark Kotyk wrote:
- >
- > I've been trying to get a good Com class going, but soon found
- > out there is no easy way to get a Dos interrupt handler to sit
- > in a class, and have access to private data members.
- >
- > Any help. I have picked up a package that did allow interrupts
- > to be created dynamically, but it was rather large.
-
- Using a member function as an interrupt handler usually isn't going to work.
- A better way is to just pick up a pointer to a class inside your ISR;
-
- void _interrupt isr(...)
- {
- COM *c;
- c = com_objects[ i ]; //or whatever
- id = inp( c->iir );
-
- I used this technique in my book on C++ serial communiations. You can get
- more info about it from my home page.
-
- Mark Nelson
- http://web2.airmail.net/markn
-